package com.ruoyi.web.controller.system;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.Email;
import com.ruoyi.system.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.SimpleMailMessage;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.File;
import java.io.IOException;
import java.util.UUID;

@RestController
@RequestMapping("/system/email")
public class EmailController {

    @Autowired
    private EmailService emailService;

    @Log(title = "邮件", businessType = BusinessType.INSERT)
    @PostMapping
    public void add(@RequestBody Email email)
    {
        emailService.receiveMail(email);
    }
}
